package com.template;

/**
 * Created by yangjun on 2018/3/22.
 */
public class Singleton {

    private static final Singleton singleton = new Singleton();

    //限制产生多个对象
    private Singleton() {}

    //通过该方法获得对象实例
    public static Singleton getInstance() {
        return singleton;
    }
}
